const express = require('express')
const bodyParser = require('body-parser')
const app = express()
const apiRouter = require('./api')

app.use(bodyParser.json())
app.use(bodyParser.urlencoded({
  extended: true
}))

app.get('/', (req, res, next) => {
  res.send('Hello world')
})

app.use('/api/web', apiRouter)

app.listen(5000, () => {
  console.log('5000服务已启动')
})